<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Institutional extends MY_Controller {
	
	public function __construct()
	{
		parent::__construct();
		$this->check_authentication(2);
		$this->lang->load('company', $this->session->userdata['user_lang']);
		$this->lang->load('company/institutional', $this->session->userdata['user_lang']);
		$this->load->model('Company_model', 'company');
	}
	
	public function index()
	{
		$data['main_content'] = 'company/institutional';
        $data['userdata'] = $this->session->userdata;
        $data['company'] = $this->company->get(array('idmember' => $this->session->userdata['idmember']));
        
        
        $data['extrascript'] = '';
        $data['extrascript'] .= '$("#birthday").val("'.$data['company']->birthday.'");';
        $data['extrascript'] .= '$("#birthmonth").val("'.$data['company']->birthmonth.'");';
        $data['extrascript'] .= '$("#birthyear").val("'.$data['company']->birthyear.'");';
        $data['extrascript'] .= '$("#idcategory").val("'.$data['company']->idcategory.'");';
        $data['extrascript'] .= '$("#idsize").val("'.$data['company']->idsize.'");';
        $data['extrascript'] .= '$("#idcountry").val("'.$data['company']->idcountry.'");';
		
        $data['page_title'] = $this->lang->line('institutional_title');
        $this->load->view('template-company', $data);
	}
}

?>